package Fruit;

public class FruitTest {
    public static void main(String[] args) {
        Fruit apple = new Apple();
        apple.setName("苹果");
        apple.setArea("陕西");
        apple.setPrice(5.0);
        apple.setType("红富士");
        Fruit watermelon = new Watermelon();
        watermelon.setName("西瓜");
        watermelon.setArea("海南");
        watermelon.setPrice(10.0);
        watermelon.setType("青皮");
        Fruit peaches = new Peaches();
        peaches.setName("桃子");
        peaches.setArea("云南");
        peaches.setPrice(8.0);
        peaches.setType("水蜜桃");
        System.out.println("水果：" + apple.getName() + "，品种：" + apple.getType() + "，产地：" + apple.getArea() + "，价格：" + apple.getPrice() + "元/斤");
        System.out.println("水果：" + watermelon.getName() + "，品种：" + watermelon.getType() + "，产地：" + watermelon.getArea() + "，价格：" + watermelon.getPrice() + "元/斤");
        System.out.println("水果：" + peaches.getName() + "，品种：" + peaches.getType() + "，产地：" + peaches.getArea() + "，价格：" + peaches.getPrice() + "元/斤");

    }
}
